/*
 * Copyright 2008-2023 dexian.vip. All rights reserved.
 * Support: http://www.dexian.vip
 * License: http://www.dexian.vip/license
 */

package vip.dexian.admin.service;

import vip.dexian.admin.command.DepartmentSaveCommand;
import vip.dexian.admin.command.DepartmentUpdateCommand;
import vip.dexian.admin.dto.DepartmentDTO;
import vip.dexian.admin.entity.Department;
import vip.dexian.core.base.service.BaseService;

import java.util.List;

/**
 * 部门
 *
 * @author 挺好的 2023年05月31日 10:10
 */
public interface DepartmentService extends BaseService <Department, DepartmentDTO, Long> {

    /**
     * 查找部门分类树
     *
     * @return 部门分类树
     */
    List <DepartmentDTO> findTree ();

    /**
     * 保存部门信息
     *
     * @param command
     *         保存指令
     *
     * @return {@link vip.dexian.admin.entity.Department}
     */
    Department save (DepartmentSaveCommand command);

    /**
     * 修改部门信息
     *
     * @param command
     *         修改指令
     */
    Department update (DepartmentUpdateCommand command);

}
